package jmu.cyxwcy.librarymanagement.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import jmu.cyxwcy.librarymanagement.pojo.Book;
import jmu.cyxwcy.librarymanagement.pojo.Teachers;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 
 * @since 2024-06-25
 */
public interface TeachersMapper extends MPJBaseMapper<Teachers> {
    @Select("select * from library_management.teachers where username=#{username}")
    Teachers findByUserName(String username);

    @Update("update library_management.teachers set password=#{md5String} where teacher_id=#{teacherId}")
    void resetPassword(Integer teacherId, String md5String);
}
